import { translateTitle } from '@/utils/i18n'
const UserRole = {
  UserRole: {
    search: {
      form: {
        method: 'dams.userRoleMangage.query',
        name: 'search',
        field: [
          {
            type: 'input',
            name: 'USER_ID',
            label: translateTitle('Dams.DamsSystemManagement.用户编号'),
            labelHidden: false,
          },
          {
            type: 'input',
            name: 'USER_NAME',
            label: translateTitle('Dams.DamsSystemManagement.用户名称'),
            labelHidden: false,
          },
          {
            type: 'button',
            label: translateTitle('Dams.DamsSystemManagement.查询'),
            labelHidden: true,
          },
        ],
      },
    },
    dialog: {
      form: {
        api: '',
        name: 'dialog',
        field: [
          {
            type: 'input',
            name: 'USER_ID',
            label: translateTitle('Dams.DamsSystemManagement.用户编号'),
            disabled_add: true,
            disabled_edit: true,
          },
          {
            type: 'input',
            name: 'USER_NAME',
            label: translateTitle('Dams.DamsSystemManagement.用户名称'),
            disabled_edit: true,
          },
          {
            type: 'button',
            label: translateTitle('Dams.DamsSystemManagement.提交'),
            labelHidden: true,
          },
        ],
      },
    },

    addMethod: 'dams.userRoleMangage.add',
    deleteMethod: 'dams.userRoleMangage.del',
    updateMethod: 'dams.userRoleMangage.edit',
    children: {
      search: {
        form: {
          method: 'dams.userRoleMangage.queryRole',
          name: 'search',
          field: [
            {
              type: 'button',
              label: translateTitle('Dams.DamsSystemManagement.查询'),
              labelHidden: true,
            },
          ],
        },
      },
      addMethod: 'dams.userRoleMangage.add',
      deleteMethod: 'dams.userRoleMangage.del',
      updateMethod: 'dams.userRoleMangage.edit',
      dialog: {
        form: {
          api: '',
          name: 'dialog',
          field: [
            {
              type: 'input',
              name: 'USER_ROLE_ID',
              label: translateTitle('Dams.DamsSystemManagement.角色编号'),
            },
            {
              type: 'input',
              name: 'ROLE_NAME',
              label: translateTitle('Dams.DamsSystemManagement.角色名字'),
              disabled_edit: true,
            },
            {
              type: 'input',
              name: 'ROLE_DESC',
              label: translateTitle('Dams.DamsSystemManagement.角色描述'),
              disabled_edit: true,
            },
            {
              type: 'input',
              name: 'ID',
              label: '',
              tableHidden: true,
              hidden: true,
            },
            {
              type: 'button',
              label: translateTitle('Dams.DamsSystemManagement.提交'),
              labelHidden: true,
            },
          ],
        },
      },
    },
  },
}
export default UserRole
